/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package xowl.interpreter.adapter;

import java.util.Collection;

/**
 *
 * @author Laurent WOUTERS
 */
public interface ProxyObject {
    xowl.interpreter.Repository getRepository();    // Get the repository containing this object
    xowl.lang.owl2.Ontology getOntology();          // Get the ontology containing this object
    xowl.lang.runtime.Entity getEntity();           // Get the ontological entity representing this object
    xowl.lang.runtime.Individual getIndividual();   // Get the individual interpretation of the ontological entity representing this object
    xowl.lang.owl2.IRI getIRI();                    // Get the IRI of this object
    String getIRIString();                          // Get the object's IRI as a string
    
    // Reflection methods to access object's properties using their name or IRI
    ProxyObject getObjectValue(String name);
    Object getDataValue(String name);
    Collection<ProxyObject> getObjectValues(String name);
    Collection<Object> getDataValues(String name);
    ProxyObject getObjectValue(xowl.lang.owl2.IRI property);
    Object getDataValue(xowl.lang.owl2.IRI property);
    Collection<ProxyObject> getObjectValues(xowl.lang.owl2.IRI property);
    Collection<Object> getDataValues(xowl.lang.owl2.IRI property);
    
    void delete();  // Delete this objects
    
    // Management methods for the observation of this object
    void addPropertyObserver(String name, ObjectPropertyObserver observer);
    void addPropertyObserver(String name, DataPropertyObserver observer);
    void addPropertyObserver(xowl.lang.owl2.IRI property, ObjectPropertyObserver observer);
    void addPropertyObserver(xowl.lang.owl2.IRI property, DataPropertyObserver observer);
    void removePropertyObserver(ObjectPropertyObserver observer);
    void removePropertyObserver(DataPropertyObserver observer);
    void removeAllObservers();
}
